package com.shihb.chapter03oop

/**
 * 练习
 */
object Demo02Training {
  def main(args: Array[String]): Unit = {
    val dog = new Dog
    dog.name = "hh"
    dog.age = 2
    dog.weight = 3.2
    println(dog.say)
  }

}

class Dog {
  var name: String = _
  var age: Int = _
  var weight: Double = _

  def say = {
    name + "," + age + "," + weight
  }
}
